﻿const { Menu } = antd;
const Nav = function () {
    const handleClick = function () {
        console.log("test");
    }
    const current = location.pathname.substring(location.pathname.indexOf("/") + 1);
    return (
        <Menu onClick={handleClick} mode="horizontal" selectedKeys={[current]}>
            <Menu.Item key="index">
                <a href="/index" target="_self">
                    所有任务
                </a>
            </Menu.Item>
            <Menu.Item key="setting">
                <a href="/setting" target="_self">
                    配置管理
                </a>
            </Menu.Item>
        </Menu>    
    )
}

render(<Nav />, "nav")